package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AdPerformanceMapper;
import com.ruoyi.system.domain.AdPerformance;
import com.ruoyi.system.service.IAdPerformanceService;

/**
 * 广告数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-15
 */
@Service
public class AdPerformanceServiceImpl implements IAdPerformanceService 
{
    @Autowired
    private AdPerformanceMapper adPerformanceMapper;

    /**
     * 查询广告数据
     * 
     * @param performanceId 广告数据主键
     * @return 广告数据
     */
    @Override
    public AdPerformance selectAdPerformanceByPerformanceId(Long performanceId)
    {
        return adPerformanceMapper.selectAdPerformanceByPerformanceId(performanceId);
    }

    /**
     * 查询广告数据列表
     * 
     * @param adPerformance 广告数据
     * @return 广告数据
     */
    @Override
    public List<AdPerformance> selectAdPerformanceList(AdPerformance adPerformance)
    {
        return adPerformanceMapper.selectAdPerformanceList(adPerformance);
    }

    /**
     * 新增广告数据
     * 
     * @param adPerformance 广告数据
     * @return 结果
     */
    @Override
    public int insertAdPerformance(AdPerformance adPerformance)
    {
        return adPerformanceMapper.insertAdPerformance(adPerformance);
    }

    /**
     * 修改广告数据
     * 
     * @param adPerformance 广告数据
     * @return 结果
     */
    @Override
    public int updateAdPerformance(AdPerformance adPerformance)
    {
        return adPerformanceMapper.updateAdPerformance(adPerformance);
    }

    /**
     * 批量删除广告数据
     * 
     * @param performanceIds 需要删除的广告数据主键
     * @return 结果
     */
    @Override
    public int deleteAdPerformanceByPerformanceIds(Long[] performanceIds)
    {
        return adPerformanceMapper.deleteAdPerformanceByPerformanceIds(performanceIds);
    }

    /**
     * 删除广告数据信息
     * 
     * @param performanceId 广告数据主键
     * @return 结果
     */
    @Override
    public int deleteAdPerformanceByPerformanceId(Long performanceId)
    {
        return adPerformanceMapper.deleteAdPerformanceByPerformanceId(performanceId);
    }
}
